<!DOCTYPE html>
<html>
    <head>
        <script src="js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <button @click="isEditing=!isEditing">切换保存和编辑</button>
            <transition name="fade">
                <button v-bind:key="isEditing"  >{{isEditing?'保存':'编辑'}}</button>
            </transition>
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data : {
                    isEditing : true
                }
            });
        </script>
    </body>
</html>